package com.zbkj.dal.base.enums;

import com.zbkj.dal.common.exception.CrmebException;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

@Getter
@AllArgsConstructor
public enum BooleanEnums {

    TRUE(1, true),
    FALSE(0, false),
    ;
    private final Integer code;

    private final boolean result;

    public static boolean isTrue(Integer code) {
        return Objects.equals(code, TRUE.getCode());
    }

    public static boolean isFalse(Integer code) {
        return Objects.equals(code, FALSE.getCode());
    }

}
